6
};
-static GSList *global_tables;
+G_LOCK_DEFINE_STATIC (global_tables);
+static GSList *global_tables;
static const guint16 gtk_compose_ignore[] = {
GDK_KEY_Shift_L,
}
else
{
+ gboolean success = FALSE;
+
+ G_LOCK (global_tables);
+
tmp_list = global_tables;
while (tmp_list)
{
if (check_table (context_simple, tmp_list->data, n_compose))
- return TRUE;
+ {
+ success = TRUE;
+ break;
+ }
tmp_list = tmp_list->next;
}
+ G_UNLOCK (global_tables);
+
+ if (success)
+ return TRUE;
+
GTK_NOTE (MISC, {
g_print ("[ ");
for (i = 0; i < n_compose; i++)
{
g_return_if_fail (GTK_IS_IM_CONTEXT_SIMPLE (context_simple));
+ G_LOCK (global_tables);
+
global_tables = gtk_compose_table_list_add_array (global_tables,
data, max_seq_len, n_seqs);
+
+ G_UNLOCK (global_tables);
}
/*
{
g_return_if_fail (GTK_IS_IM_CONTEXT_SIMPLE (context_simple));
+ G_LOCK (global_tables);
+
global_tables = gtk_compose_table_list_add_file (global_tables,
compose_file);
+
+ G_UNLOCK (global_tables);
}